Hey there !
Trying to automate the integration creation process.
I have 70-80 services, which needs to be integrated with Zendesk API and get the Integration Keys
- UPDATED THE QUESTION *
Trying to make this request (To create a Zendesk API integration):
const axios = require('axios');
let data = JSON.stringify({
"integration": {
"type": "app_event_transform_inbound_integration",
"name": "Zendesk API",
"service": {
"id": "X",
"type": "service_reference"
},
"integration_email": "X",
"vendor": {
"id": "PEP6E4P",
"type": "vendor_reference",
"summary": "Zendesk API",
"self": "https://api.pagerduty.com/vendors/PEP6E4P",
"html_url": null
}
}
});
let config = {
method: 'post',
url: 'https://api.pagerduty.com/services/X/integrations',
headers: {
'Accept': 'application/vnd.pagerduty+json;version=2',
'Authorization': 'Token token=X',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Respone :
{
"error": {
"message": "Access Denied",
"code": 2010
}
}
Any suggestions ?